package com.ssy.lingxi.report.entity.report;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 下级会员报表[记录当前(上级)会员的下级会员数量]
 * @author 伍将
 * @date 2020/11/9
 * @version 2.0.0
 */
@Entity
@Table(schema = "public", name = "rep_sub_member_report", indexes = {@Index(name = "rep_sub_member_report_date_time_idx", columnList = "dateTime"),
        @Index(name = "rep_sub_member_report_member_id_role_id_idx", columnList = "memberId,roleId")})
public class SubMemberReportDO implements Serializable {
    private static final long serialVersionUID = 8020713051752080826L;

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sub_member_report_seq")
    @SequenceGenerator(sequenceName = "rep_sub_member_report_seq", name = "sub_member_report_seq", allocationSize = 1)
    private Long id;

    /**
     * 日期时间
     */
    @Column(columnDefinition = "timestamp")
    private LocalDateTime dateTime;

    /**
     * 上级会员id
     */
    @Column(columnDefinition = "int8")
    private Long memberId;

    /**
     * 上级会员角色id
     */
    @Column(columnDefinition = "int8")
    private Long roleId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public LocalDateTime getDateTime() {
        return dateTime;
    }

    public void setDateTime(LocalDateTime dateTime) {
        this.dateTime = dateTime;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

}
